<div id="lib_new_form">
	<form name="ajouter" method="post" action="index.php?a=lib&sa=new&d=lib"  enctype="multipart/form-data">
	<table width="100%" border="0" class="small">
		<tr>
			<td width="10%">
				<?php say("lib_titre");?>
			</td>
			<td width="50%">
				<input name="titre" type="text" id="titre" style="width:99%;">
			</td>
			<td width="10%">
				<input type="submit" name="submit" id="submit" value="<?php say("lib_save");?>" style="width:99%;">
			</td>

			<td rowspan="3" width="15%">
				<?php say("lib_tags");?><br />
				<textarea name="tags" id="tags" rows="5" cols="30" style="width:100%;"></textarea>
			</td>

			<td rowspan="3" width="15%"><?php say("lib_labels");?><br />
				<select name="labels[]" size="5" multiple="multiple" id="labels" style="width:100%;">
					<?php
					/* Obtenir la liste des labels */
					$sql = "SELECT id,nom FROM lib_labels;";
					$connexion = new Connexion();
					$req = $connexion->query($sql);
					while($d = $connexion->fetch_assoc($req))
						echo "<option value=".$d['id'].">".stripslashes($d['nom'])."</option>";
					?>
				</select>
			</td>
		</tr>
		<tr colspan="3">
			<td width="10%"><?php say("lib_theme");?></td>
			<td colspan="2" width="60%"><input name="theme" type="text" id="theme" size="40" style="width:99%;"></td>
		</tr>

		<tr colspan="3">
			<td width="10%"><?php say("lib_references");?></td> 
			<td colspan="2" width="60%"><input name="reference" type="text" id="reference" size="50" style="width:99%;"></td>
		</tr>
		
		<tr colspan="3">
			<td><?php say("lib_fichier");?><br />
				<input type="button" onclick="rmv_file_line();" value="<?php say('search_rmvline');?>" />
				&nbsp;
				<input type="button" onclick="add_file_line();" value="<?php say('search_addline');?>" />
			</td>
			<td colspan="2" style="font-size:0.7em;">
				<table id="files_tab" style="margin:0 auto; width:100%">
					<tr>
						<td>
							<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo config("maxfilesize"); ?>">
							<input name="fichier[]" type="file" id="fichier" style="width:99%;">
						</td>
					</tr>
				</table>
			</td>
	  	</tr>

		<tr>
			<td colspan="5" width="100%">
			<textarea name="text" id="text" rows="50" style="width:100%;"></textarea>
			</td>
		</tr>
	</table>
</div>

